Analysis on Dynamic Memory Allocation

نویسنده

  • Wenbin Fang
چکیده

Dynamic memory allocator has been an essential component in computer software for decades, which evolves to be sophisticated to meet both the strict performance and space requirements. This paper studies the design of simplified versions of two popular dynamic memory allocators, namely, the dlmalloc used in GNU libc and the tcmalloc used in Google Chrome browser. In this paper, we also conduct algorithmic analysis on the time complexity of malloc and free operations for requesting and releasing a memory buffer respectively. In addition, we investigate the memory wastage in both allocators due to their metadata overhead and internal fragmentation. Our analysis shows that the dlmalloc has O(1) running time for both malloc and free, while the tcmalloc has O(n) running time for malloc and O(1) for free. The dlmalloc wastes as much as 1/3 space due to metadata overhead, while the worst case metadata overhead in the tcmalloc is inversely proportional to the size of allocated space. Furthermore, both the dlmalloc and the tcmalloc may have severe space wastage due to internal fragmentation, where the dlmalloc may have as much as 1500% such wastage, and the tcmalloc may have 700% in the worst case.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dynamic Memory Allocator for Sensor Operating System Design and Analysis

Dynamic memory allocation is an important mechanism used in operating systems. An efficient dynamic memory allocator can improve the performance of operating systems. In wireless sensor networks, sensor nodes have miniature computing device, small memory space and very limited battery power. Therefore, it is important that sensor operating systems operate efficiently in terms of energy consumpt...

متن کامل

An Analysis the Effect of Capital Taxation on Allocation of Resources: A Dynamic Equilibrium Model Approach

Abstract T he return of capital is fundamental to the intertemporal allocation of resources by changing the consumption behavior and capital accumulation over time. Taxation on return of capital increases the marginal product of capital, meaning that capital stock is lower than when capital is not taxed, which results decreased growth and welfare in steady state. This pape...

متن کامل

CAMA - Cache-Aware Memory Allocation for WCET Analysis

Current WCET analyses do not support dynamic memory allocation. This is mainly due to the unpredictability of the cache performance if standard memory allocators are used. We present a novel dynamic memory allocator that makes cache performance predictable and (de)allocates memory in constant time. It thereby enables WCET analysis in the presence of dynamic memory allocation.

متن کامل

Kernel Malware Analysis with Un-tampered and Temporal Views of Dynamic Kernel Memory

Dynamic kernel memory has been a popular target of recent kernel malware due to the difficulty of determining the status of volatile dynamic kernel objects. Some existing approaches use kernel memory mapping to identify dynamic kernel objects and check kernel integrity. The snapshot-based memory maps generated by these approaches are based on the kernel memory which may have been manipulated by...

متن کامل

Contract based management of the memory resource

Resource reservation has been widely used in many realtime systems to guarantee the proper access to the system resources. Despite that being the memory a key resource, it has attracted little attention in the specific area of realtime systems. In order to use dynamic memory in real-time systems, two fundamental problems have to be settled: allocation and deallocation in bounded time, and the f...

متن کامل

Online Verification of Offline Escape Analysis

Dynamic compilation often comes at the price of reduced code quality since there is not enough time available to perform expensive optimizations. One solution to this problem has been the addition of annotations by the code producer that enable an annotation-aware dynamic code generator on the code consumer’s side to shortcut certain analysis and optimization steps. However, code annotation oft...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012